{% include 'header.html' %}
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ platform }} 游戏 - Steam游戏库</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="container mt-4">
        <h2>{{ platform }} 游戏</h2>
        <p class="text-muted">共 {{ games|length }} 个游戏</p>

        {% if games %}
        <div class="row">
            {% for game in games %}
            <div class="col-md-3 mb-4">
                <div class="card h-100">
                    <img src="{{ game['照片路径'] }}" class="card-img-top" alt="{{ game['游戏名称'] }}">
                    <div class="card-body">
                        <h5 class="card-title">{{ game['游戏名称'] }}</h5>
                        <p class="card-text">
                            <small class="text-muted">上架时间: {{ game['上架时间'] }}</small><br>
                            <span class="badge bg-{{ 'success' if game['评价等级'] == '好评' else 'warning' }}">
                                {{ game['评价等级'] }}
                            </span>
                        </p>
                        <div class="d-flex justify-content-between align-items-center">
                            <span class="price">{{ game['最终价格'] }}</span>
                            {% if game['折扣'] != 'N/A' %}
                            <span class="discount badge bg-danger">{{ game['折扣'] }}</span>
                            {% endif %}
                        </div>
                    </div>
                </div>
            </div>
            {% endfor %}
        </div>
        {% else %}
        <div class="alert alert-info">
            该平台暂无游戏。
        </div>
        {% endif %}
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html> 